#include<stdio.h>
int main()
{
	int i;
	char temp;
	char s[50]="";
	gets(s);
	int n=strlen(s);
	for(i=0; s[i]!='\0'; i++)
	{
	    if(s[i]>='a'&&s[i]<='z')
        {
            s[i]=(s[i]-3-'z')%26+'z';
        }
        else if(s[i]>='A'&&s[i]<='Z')
        {
            s[i]=(s[i]-3-'Z')%26+'Z';
        }
	}
    for(i=0;i<(n/2);i++)
    {
        temp = s[i];
        s[i] = s[n-i-1];
        s[n-i-1] = temp;
    }
	for(i=0;s[i]!='\0';i++)
    {
        if(s[i]>='a'&&s[i]<='z')
        {
            s[i]=s[i]-32;
        }
        else if(s[i]>='A'&&s[i]<='Z')
        {
            s[i]=s[i]+32;
        }
    }
	puts(s);
	return 0;
}
